<%@page import="java.util.List"%>
<%@page import="java.text.SimpleDateFormat"%>
<%@page import="java.util.Date"%>
<%@page import="com.pb.poem.service.PoemService"%>
<%@page import="com.pb.poem.entity.Common"%>
<%@include file="../common/common.jsp" %>
<%@ page language="java" contentType="text/html; charset=UTF-8"  pageEncoding="UTF-8"%>
<%
request.setCharacterEncoding("utf-8");
int id=Integer.parseInt(request.getParameter("poemid"));
String content=request.getParameter("content"+id); 
Date date=new Date();

Common common=new Common();
common.setId(id);
common.setDate(date);
common.setContent(content);
SimpleDateFormat sdf=new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");

int pid=poemService.addCommon(common);

out.print("<span class=\"aa"+pid+"\">"+content+"&nbsp;&nbsp;&nbsp;&nbsp;"+
sdf.format(date)+"&nbsp;&nbsp;<input type=\"button\" onclick=\"del_comment("+id+","+pid+")\" value=\"删除评论\"><br /></span>");
%>